/**
    package: learn-go
    filename: package_a
    author: diogo@gmail.com
    time: 2021/8/25 11:31
**/
package package_a

import (
	"fmt"
	"gitee.com/diogoxiang/learn-go/example/cycle/demo/callback"
)

func init() {
	callback.RegisterCallBack("getA", new(PackageA).GetA)
}

type PackageA struct {
}

func (a PackageA) GetA() string {
	return "I'm a!"
}

func (a PackageA) PrintAll() {
	fmt.Println(a.GetA())
	fmt.Println(callback.CallBackFunc("getB")[0].(string))
}
